import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 故我
 * Date: 2023-06-13
 * Time: 13:19
 */
class Test {
    int x;
    static int y;

    public void test() {
        int m;
        //int y=x+m;
        System.out.println("haha!");
    }
}

abstract class ddA{
    //public abstract static void cry();//抽象类就是为了被继承，而static不能被继承
}

class AA{
    public float getNum(){
        return 3.14f;
    }
}

class ddB extends ddA{
    public void getNum(double f){

    }
}

class AAA{
    static{
        System.out.println("AAA 中的静态代码块!");
    }

    {
        System.out.println("AAA 中的实例代码块!");
    }
}


class Testdemo4 {
    /*public static void main(String[] args) {
        //Test::test();//不能
        Test test = new Test();
        test.y=10;
        //Test::x=20;
    }*/

   /* public static void main(String[] args) {
        f(1, 2);
        f(-1, -2, -3, -4);
        f(9, 7, 6);
    }

    public static void f(int... x) { //像c++的 initializer_list
        for(int i=0;i<x.length;i++){
            System.out.println(x[i]);
        }
    }*/

    static{
        System.out.println("Testdemo4中的 静态代码块!");
    }

    {
        System.out.println("Testdemo4中的 实例代码块!");
    }

    public static void main1(String[] args) {
        AAA a = new AAA();
        System.out.println("main 中的代码块!");
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
//        while(scanner.hasNext()){
//            if()
//        }
    }



}
